from flask import jsonify


class Response():
    @staticmethod
    def success(status=200, message="请求成功", data=None):
        response = {
            "status": status,
            "message": message,
            "data": data
        }
        return jsonify(response)



    @staticmethod
    def error(status=400, message="请求失败", data=None):
        response = {
            "status": status,
            "message": message,
            "data": data
        }
        return jsonify(response)
